package com.meilai.project.mapper.system;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.meilai.project.dto.workflow.WorkFlowConditionForDepJobDTO;
import com.meilai.project.entity.system.UserDepartmentRelation;
import com.meilai.project.vo.system.WebUserDepartmentRelationByUserIdVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 张驰
 * @date 2020/11/24 16:00
 */
@Mapper
public interface UserDepartmentRelationMapper extends BaseMapper<UserDepartmentRelation> {
    Integer countUserRelationByDepartmentId(@Param("department_ids") List<Long> department_ids);

    List<WebUserDepartmentRelationByUserIdVO> getWebVOByUserId(@Param("user_id") Long user_id);

    List<WebUserDepartmentRelationByUserIdVO> getWebVOByUserIds(@Param("ids") List<Long> user_ids);

    List<WorkFlowConditionForDepJobDTO> getDepJobForWorkFlow();

    List<WebUserDepartmentRelationByUserIdVO> getActiveVOByUserId(@Param("user_id") Long user_id);
}
